home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / 001-010 / amok08 / blitter / movedraw.mod < prev    next >
Text File  |  1993-11-04  |  2KB  |  56 lines

  1. MODULE MoveDraw;
  2.  
  3. FROM SYSTEM    IMPORT ADR, ADDRESS, SHIFT, BITSET, CAST;
  4.  
  5. FROM Dos       IMPORT Delay;
  6.  
  7. FROM Graphics  IMPORT OwnBlitter, DisownBlitter, WaitBlit, ViewModes,
  8.                       ViewModeSet, RastPortPtr, Draw, Move, DrawModes,
  9.                       DrawModeSet, SetDrMd;
  10.  
  11. FROM Intuition IMPORT OpenScreen, CloseScreen, customScreen, NewScreen,
  12.                       ScreenPtr, CurrentTime;
  13.  
  14. FROM InOut     IMPORT WriteInt, WriteString, WriteLn;
  15.  
  16. VAR
  17.   NuScreen: NewScreen;
  18.   Screen: ScreenPtr;
  19.   i: INTEGER;
  20.   x0,y0,x1,y1: INTEGER;
  21.   Secs,secs,Micros,micros: LONGINT;
  22.   RP: RastPortPtr;
  23.  
  24.  
  25. BEGIN
  26.   WITH NuScreen DO
  27.     leftEdge := 0; topEdge := 0; width := 320; height := 256; depth := 1;
  28.     detailPen := 0; blockPen := 1;
  29.     viewModes := ViewModeSet{};
  30.     type := customScreen;
  31.     font := NIL;
  32.     defaultTitle := ADR("Blitter");
  33.     gadgets := NIL;
  34.     customBitMap := NIL;
  35.   END;
  36.   Screen := OpenScreen(NuScreen);
  37.   RP := ADR(Screen^.rastPort);
  38.   SetDrMd(RP,DrawModeSet{complement});
  39.   CurrentTime(ADR(Secs),ADR(Micros));
  40.   FOR i:=0 TO 31 DO
  41.     FOR x0:=0 TO 319 DO
  42.       Move(RP,0,  0); Draw(RP,x0,255); Draw(RP,319,  0);
  43.       Move(RP,0,255); Draw(RP,x0,  0); Draw(RP,319,255);
  44.     END;
  45.   END;
  46.   CurrentTime(ADR(secs),ADR(micros));
  47.   IF micros<Micros THEN
  48.     INC(micros,1000000);
  49.     DEC(secs,1);
  50.   END;
  51.   WriteString("This took");
  52.   WriteInt(secs-Secs,3); WriteString(" seconds and");
  53.   WriteInt(micros-Micros,7); WriteString(" micros."); WriteLn;
  54.   CloseScreen(Screen);
  55. END MoveDraw.
  56.